package cn.zqy.demo1.day01XML.Jsoup;

import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;

/*** 对象的使用：
 * 1. Jsoup：工具类，可以解析html或xml文档，返回Document
 * 		 parse：解析html或xml文档，返回Document
 * 		 parse​(File in, String charsetName)：解析xml或html文件的。
 * 		 parse​(String html)：解析xml或html字符串
 * */
public class Demo02JsoupClassJsoup {
    public static void main(String[] args) {
        String str = "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n" +
                "\n" +
                "<students>\n" +
                "\t<student number=\"heima_0001\">\n" +
                "\t\t<name id=\"itcast\">\n" +
                "\t\t\t<xing>张</xing>\n" +
                "\t\t\t<ming>三</ming>\n" +
                "\t\t</name>\n" +
                "\t\t<age>18</age>\n" +
                "\t\t<sex>male</sex>\n" +
                "\t</student>\n" +
                "\t<student number=\"heima_0002\">\n" +
                "\t\t<name>jack</name>\n" +
                "\t\t<age>18</age>\n" +
                "\t\t<sex>female</sex>\n" +
                "\t</student>\n" +
                "\n" +
                "</students>";
        Document parse = Jsoup.parse(str);
        System.out.println(parse);
    }
}
